from django.contrib import admin
from worksite.models import *
# Register your models here.


class HostConfig(admin.ModelAdmin):
    list_display = ["ip","vendor","service","network"]
    list_filter = ["vendor"]
    search_fields = ["ip"]



class MyworkBaselineConfig(admin.ModelAdmin):
    list_display = ["date","ip","os",]
    list_filter = ["date"]
    search_fields = ["ip"]

class SecurityDomainConfig(admin.ModelAdmin):
    list_display = ["security_domian"]


class UserConfig(admin.ModelAdmin):
    list_display = ["host","user","password","root_password","management",]
    list_filter = ["management"]
    search_fields = ["host"]

class MyworkSoftwareConfig(admin.ModelAdmin):
    list_display = ["date","ip","os",]
    list_filter = ["date"]
    search_fields = ["ip"]


class MyworkSoftwareAndSoftwareConfig(admin.ModelAdmin):
    list_display = ["mywork_software","software",]


class JumpserverConfig(admin.ModelAdmin):
    list_display = ["server","ip",]






admin.site.register(Host,HostConfig)
admin.site.register(Vendor)
admin.site.register(Service)
admin.site.register(Software)
admin.site.register(Os)
admin.site.register(Network)
admin.site.register(MyworkBaseline,MyworkBaselineConfig)
admin.site.register(MyworkSoftwareAndSoftware,MyworkSoftwareAndSoftwareConfig)
admin.site.register(MyworkSoftware,MyworkSoftwareConfig)
admin.site.register(User,UserConfig)
# admin.site.register(User,)
admin.site.register(Jumpserver,JumpserverConfig)
admin.site.register(SecurityDomain,SecurityDomainConfig)